.sidebar {
  width: 220px;
  background: #fff;
  height: 100vh;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.sidebar-title {
  font-size: 32px;
  font-weight: bold;
  margin: 0 0 1rem 0;
  letter-spacing: 2px;
  text-align: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 1rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.user-role {
  font-size: 0.8rem;
  color: #666;
}

.token-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
}

.status-indicator.valid {
  background: #28a745;
  color: white;
}

.status-indicator.expired {
  background: #ffc107;
  color: #333;
}

.status-indicator.refreshing {
  background: #007bff;
  color: white;
  animation: spin 1s linear infinite;
}

.refresh-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.125rem 0.25rem;
  border-radius: 3px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  background: #0056b3;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logout-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: #c82333;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0 0 0 0;
  margin: 0 0 0 0;
}

.sidebar-nav li {
  display: flex;
  align-items: center;
  font-size: 18px;
  padding: 12px 0 12px 24px;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px 0 0 8px;
}

.sidebar-nav li.active, .sidebar-nav li:hover {
  background: #eaf6fb;
  font-weight: bold;
}

.sidebar-nav hr {
  border: none;
  border-top: 1px solid #ececec;
  margin: 18px 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 12px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.icon.home { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 12L12 3l9 9"/><path d="M9 21V9h6v12"/></svg>'); }
.icon.user { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="8" r="4"/><path d="M4 21v-2a4 4 0 014-4h8a4 4 0 014 4v2"/></svg>'); }
.icon.plus { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 5v14M5 12h14"/></svg>'); }
.icon.template { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>'); }
.icon.material { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="4"/></svg>'); }
.icon.tool { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M14.7 6.3a5 5 0 01-7.07 7.07l-4.24 4.24a2 2 0 102.83 2.83l4.24-4.24a5 5 0 017.07-7.07z"/></svg>'); }
.icon.ai { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="M8 12h8M12 8v8"/></svg>'); }
.icon.chat { background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23000" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/></svg>'); }

.beta {
  display: inline-block;
  font-size: 12px;
  color: #999;
  background: #ececec;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
} 